package com.study.app.service;

import com.study.app.entity.User;
import com.study.app.repository.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author sjw
 * @className UserService
 * @date 2020/11/18 10:32
 * @description: TODO
 */
@Service
public class LockService {
    @Autowired
    private UserDao userDao;

    public List<User> users(){
        return userDao.findAll();
    }


    public long lock(){
        return Thread.currentThread().getId();
    }

}
